import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: { name: 'index' }
  },
  {
    path: '/newsList',
    name: 'NewsList',
    component: () => import('@/views/News/NewsList.vue'),
  },
  {

    path: '/index',
    name: 'index',
    component: () => import(/* webpackChunkName: "about" */ '../views/Home/index.vue')
  },
  {
    path: '/imgList',
    name: 'imgList',
    component: () => import('@/views/Images/imgList.vue'),

  },
  {
    path: '/imgdetial/:id',
    name: 'imgdetial',
    component: () => import('@/views/Images/imgdetial.vue'),

  },
  {
    path: '/shopcart',
    name: 'shopcart',
    component: () => import('../views/Car/CarList.vue')
  },
  {
    path: '/newsList',
    name: 'NewsList',
    component: () => import('@/views/News/NewsList.vue'),
  },
  {
    path: '/newsDetial/:id',
    name: 'NewsDetial',
    component: () => import('@/views/News/NewsDetial.vue'),
  },
  {
    name: 'GoodsList',
    path: "/GoodsList",
    component: () => import('@/views/Goods/GoodsList.vue')
  },
  {
    name: 'GoodsDetial',
    path: "/GoodsDetial/:id",
    component: () => import('@/views/Goods/GoodsDetial.vue')
  },
  {
    name: 'GoodsDesc',
    path: "/GoodsDesc/:id",
    component: () => import('@/views/Goods/GoodsDesc.vue')
  },
  {
    name: 'Comment',
    path: "/Comment/:id",
    component: () => import('@/views/Goods/Comment.vue'),
  },
  {
    name: 'vip',
    path: "/vip",
    component: () => import('@/views/Vip/vip.vue'),
  },
  {
    name: 'search',
    path: "/search",
    component: () => import('@/views/Search/search.vue'),
  },
  {
    name: 'call',
    path: "/call",
    component: () => import('@/views/User/call.vue'),
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
